home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #2
/
Amiga Plus CD - 2004 - No. 02.iso
/
AmigaPlus
/
Tools
/
Development
/
AmigaTalk
/
AmigaTalk.install
< prev
next >
Wrap
Text File
|
2004-01-31
|
12KB
|
395 lines
; -------------------------------------------------------
; Installer script for AmigaTalk V2.5+
; -------------------------------------------------------
(set #welcome "This is the installer for AmigaTalk!")
(set #wrongversion
(cat "You have an old version of the program 'Installer' "
"on your Amiga!\n\n"
"The installation procedure needs at least Installer 42.9."
"\n\nPlease check your System & obtain a newer version!"
))
(set #general-help
(cat "The install script will copy all %s files &"
"directories to the destination that you specify."
"Then it will add an Assign AmigaTalk: Vol:destination/"
"statement to your User-Startup file located in the "
"S: directory."
))
(set #destdir-prompt "Select a Volume & Path where AmigaTalk will be added:")
(set #destdir-help
(cat "Select the volume that you wish to place AmigaTalk in."
"Then select a directory (if any) that will serve as a "
"parent for AmigaTalk. Example: Select DH0: as the volume,"
"then select a directory (such as Programs) & the installer"
"will make a directory called DH0:Programs/AmigaTalk, where"
"the AmigaTalk program will be placed."
))
(set #no-diskspace "To install AmigaTalk into '%s', you need at least %ld bytes of free harddrive space!")
(set #startup-prompt "An Assign has to be added to S:User-Startup for AmigaTalk.")
(set #startup-help "AmigaTalk won't work correctly without this!")
(set #runNext
(cat "Now the AmigaTalk.install will run ATalkConfig so that\ "
"AmigaTalk will have its Icon ToolTypes set to your\ "
"specifications - such as the ScreenMode to use, the\ "
"Font to use & especially how much memory to check for\ "
"at the Start of AmigaTalk. AmigaTalk will keep track\ "
"of these things after ATalkConfig is done, so you only\ "
"need to run it once."
))
;------------------------------------------------------------------------
; Cleanup any temporary mess we created
(procedure CLEANUP
; Nothing to cleanup
(delete (tackon @default-dest ".tempinstall") (all) (optional "force"))
) ; CLEANUP
;------------------------------------------------------------------------
; Obtain an installation path
(procedure GETPATH #gp_default #gp_remdir #gp_msg #gp_help
(set #gp_res "")
(while (= "" #gp_res)
(set #gp_res #gp_default)
(if (not (exists #gp_res (noreq)))
(
; Surfer 1.1 Hack:
(if (= #gp_res "Work:")
(
(set #gp_res "")
(set #gp_default @default-dest)
)
) ; if
)
) ; if
(if (OR (= "" #gp_res) (= @user-level 2))
(
; We had a problem. So we need to ask the user!
(set #gp_res
(expandpath
(askdir
(prompt #gp_msg)
(help #gp_help)
(default #gp_default)
)
)
)
)
) ; if
; If the directory does not exist, retry!
(if (<> "" #gp_res)
(
(if (not (exists #gp_res (noreq)))
(set #gp_res "")
) ; if
)
) ; if
) ; while
; return the result!
(set #gp_res #gp_res)
) ; GETPATH
;------------------------------------------------------------------------
; We can't handle this script without Installer 42.9 or better!
(if (< @installer-version 2752521)
(
; Big problem!
(message #wrongversion)
(exit (quiet))
)
)
; find out how the user wants to install things
(welcome #welcome)
(complete 0)
; First find the Destination base:
(set #ATalkDirBase (GETPATH "Work:" TRUE #destdir-prompt #destdir-help))
; We have to create a drawer "AmigaTalk" there!
(set #ATalkDir (tackon #ATalkDirBase "AmigaTalk"))
(set @default-dest #ATalkDir)
; If this is a new installation, we check the diskspace!
(if (not (exists @default-dest))
(
; For a new setup, we should leave some space!
(if (< (getdiskspace #ATalkDirBase) 4000000)
(abort (#no-diskspace #ATalkDirBase 4000000))
)
(makedir @default-dest)
(set #CatalogsDir "Locale:")
(set #BrowserDir (tackon @default-dest "Browser"))
(makedir #BrowserDir)
(set #CDir (tackon @default-dest "C"))
(makedir #CDir)
(set #CodeLibDir (tackon @default-dest "CodeLib"))
(makedir #CodeLibDir)
(set #ExamplesDir (tackon @default-dest "Examples"))
(makedir #ExamplesDir)
(set #GeneralDir (tackon @default-dest "General"))
(makedir #GeneralDir)
(set #GUIBuilderDir (tackon @default-dest "GUIBuilder"))
(makedir #GUIBuilderDir)
(set #HelpDir (tackon @default-dest "Help"))
(makedir #HelpDir)
(set #HooksDir (tackon @default-dest "Hooks"))
(makedir #HooksDir)
(set #ImageDir (tackon @default-dest "Images"))
(makedir #ImageDir)
(set #IntuitionDir (tackon @default-dest "Intuition"))
(makedir #IntuitionDir)
(set #PreludeDir (tackon @default-dest "Prelude"))
(makedir #PreludeDir)
(set #PreludeListDir (tackon @default-dest "Prelude/listFiles"))
(makedir #PreludeListDir)
(set #SystemDir (tackon @default-dest "System"))
(makedir #SystemDir)
(set #TestFilesDir (tackon @default-dest "TestFiles"))
(makedir #TestFilesDir)
(set #UserDir (tackon @default-dest "User"))
(makedir #UserDir)
(complete 9)
(copyfiles (prompt "Making AmigaTalk drawer...")
(help @copyfiles-help)
(source "AmigaTalkDrawer.info")
(dest (tackon #ATalkDirBase "AmigaTalk.info"))
)
; (copyfiles (prompt "Copying ARexxScripts...")
; (help @copyfiles-help)
; (source "ARexxScripts")
; (dest #ARexxDir)
; (pattern "#?.rexx")
; (files)
; )
(copyfiles (prompt "Copying Browser files...")
(help @copyfiles-help)
(source "Browser")
(dest #BrowserDir)
(pattern "#?")
)
(copyfiles (prompt "Copying C...")
(help @copyfiles-help)
(source "C")
(dest #CDir)
(pattern "#?")
)
(copyfiles (prompt "Copying CodeLib...")
(help @copyfiles-help)
(source "CodeLib")
(dest #CodeLibDir)
(pattern "#?")
)
(copyfiles (prompt "Copying Examples...")
(help @copyfiles-help)
(source "Examples")
(dest #ExamplesDir)
(pattern "#?.(st|p)")
)
(complete 25)
(copyfiles (prompt "Copying General...")
(help @copyfiles-help)
(source "General")
(dest #GeneralDir)
(pattern "#?.st")
)
(copyfiles (prompt "Copying GUIBuilder...")
(help @copyfiles-help)
(source "GUIBuilder")
(dest #GUIBUilderDir)
(pattern "#?.template")
)
(copyfiles (prompt "Copying Help...")
(help @copyfiles-help)
(source "Help")
(dest #HelpDir)
(pattern "#?")
)
(copyfiles (prompt "Copying Hooks (if any)...")
(help @copyfiles-help)
(source "Hooks")
(dest #HooksDir)
(pattern "#?")
)
(copyfiles (prompt "Copying Catalogs...")
(help @copyfiles-help)
(source "Locale/Catalogs")
(dest #CatalogsDir)
(pattern "#?")
)
(copyfiles (prompt "Copying Images...")
(help @copyfiles-help)
(source "Images")
(dest #ImageDir)
(pattern "#?")
)
(copyfiles (prompt "Copying Intuition...")
(help @copyfiles-help)
(source "Intuition")
(dest #IntuitionDir)
(pattern "#?.(st|p)")
)
(complete 50)
(copyfiles (prompt "Copying Prelude...")
(help @copyfiles-help)
(source "Prelude")
(dest #PreludeDir)
(pattern "#?")
)
(copyfiles (prompt "Copying Prelude/listFiles...")
(help @copyfiles-help)
(source "Prelude/listFiles")
(dest #PreludeListDir)
(pattern "#?")
)
(copyfiles (prompt "Copying System...")
(help @copyfiles-help)
(source "System")
(dest #SystemDir)
(pattern "#?.(st|p)")
)
(copyfiles (prompt "Copying TestFiles...")
(help @copyfiles-help)
(source "TestFiles")
(dest #TestFilesDir)
(pattern "#?")
)
(copyfiles (prompt "Copying User...")
(help @copyfiles-help)
(source "User")
(dest #UserDir)
(pattern "#?")
)
(complete 80)
(copyfiles (prompt "Copying Main files...")
(help @copyfiles-help)
(source "AmigaTalk.env")
(dest #ATalkDir)
)
(copyfiles (prompt "Copying Main files...")
(help @copyfiles-help)
(source "AmigaTalk.colors")
(dest #ATalkDir)
)
(copyfiles (prompt "Copying Main files...")
(help @copyfiles-help)
(source "AmigaTalk.info")
(dest #ATalkDir)
)
(copyfiles (prompt "Copying Main files...")
(help @copyfiles-help)
(source "AmigaTalk.info.backup")
(dest #ATalkDir)
)
(copyfiles (prompt "Copying Main files...")
(help @copyfiles-help)
(source "TheBrowser.info")
(dest #ATalkDir)
)
(copyfiles (prompt "Copying Main files...")
(help @copyfiles-help)
(source "AmigaTalk.readme")
(dest #ATalkDir)
)
(complete 83)
(copyfiles (prompt "Copying Main program...")
(help @copyfiles-help)
(source "AmigaTalk")
(dest #ATalkDir)
(pattern "AmigaTalk")
)
(complete 98)
)
)
; Now, execute the ATalkConfig program:
(message #runNext (all))
(set #Configure (cat #ATalkDir "/C/ATalkConfig " #ATalkDir "/AmigaTalk"))
(run #Configure (safe))
(startup "AmigaTalk"
(prompt "An Assign needs to be added to the \"S:user-startup\".")
(help "AmigaTalk has to know where to find certain files.")
(command "Assign AmigaTalk: " #ATalkDir)
)
; If we have to add an Assign, we better create one right now
(makeassign "AmigaTalk" #ATalkDir)
;------------------------------------------------------------------------
; That's it!
(complete 100)
(CLEANUP)
(exit)
(abort "Well, I tried!")